One exemplary information recording medium having a sector structure is an optical disc. As the density and capacity of the optical disc have recently been increased and more and more information has been transferred by multimedia, video and audio data are now enjoyed interactively using a plurality of strings of data recorded on an optical disc. A disc, having interactive video data recorded thereon, has an AV file including a plurality of MPEG streams as well as a control file for controlling reproduction of AV data recorded thereon.
Hereinafter, with reference to FIG. 8 illustrating a directory structure, the relationship of an AV directory structure and an AV file with a control file will be described. An AV directory at which video and audio data is recorded is located under a root directory. The AV directory has AV files (AVfile-a), (AVfile-c) and (AVfile-d) including the video and audio data itself, and a control file (Datafile) including information regarding the AV files. The control file (Datafile) includes, for example, names of titles of video and audio data recorded on the disc, the order of reproduction of data strings of each title, and positional information of I picture, P picture and the like which are necessary for special reproduction such slow reproduction, fast-forwarding and the like. In the case where one control file corresponds to one AV file, a plurality of control files may be recorded. The files are recorded under a predetermined directory with predetermined file names, such that the recording and reproduction apparatus can easily access an intended file.
With reference to FIG. 21, one exemplary data structure of a DVD-RAM disc, which is a rewritable disc, having the above-described files recorded thereon using a volume file structure defined in the ECMA167 Standards will be described. An upper portion of the figure corresponds to an inner area of the disc, and a lower portion of the figure corresponds to an outer area of the disc. Logical sector numbers are allocated from the leading end of the volume space in units of a sector. A volume structure area 101 has information recorded therein for logically handling the disc as a volume, and also has positional information of a space bit map 1021 and positional information of a file entry 1022 of a root directory. In general, each file is accessed using a logical block number, but in this example, each file is accessed using a logical sector number for simplicity of explanation.
A file structure area 1001 is an area in which a descriptor for defining a file structure is to be recorded. The space bit map 1021 is a bit map for managing, in units of a sector, an unallocated area of the volume space to which a file structure or data can be allocated. The space bit map 1021 has information indicating, in units of a logical sector, whether each area has information already recorded therein or unallocated. The file entry (root directory) 1022 has attribute information and recording position information of a root directory. A root directory 1023 has positional information of an file entry 1024 of an AV directory (AVDir) recorded under the root directory.
The file entry (AVDir) 1024 has attribute information and recording position information of an AV directory (AVDir) 1025. The AV directory (AVDir) 1025 has positional information of file entries 1026, 1027, 1028 and 1029 respectively of an AV file (AVfile-a), an AV file (AVfile-c), an AV file (AVfile-d) and a control file (Datafile).
These file entries of the AV files and the control file have attribute information and positional information of the AV file (AVfile-a), the AV file (AVfile-c), the AV file (AVfile-d) and the control file (Datafile) 1030 which are recorded in a file area 1002. The file area 1002 is an area in which data of the AV files and the control file is to be recorded.
A defect management area 1003 includes a DMA (Defect Management Area) 1004 for managing a defect and a spare area 1005 in which the content of the data which is to be recorded in the defect area is substitutively recorded. In the DMA, a spare entry for managing a defect area which is substituted for and an area for substituting for the defect area is registered. The spare entry has an address 1045 of the defect area and an address 1046 of the spare area.
Next, with reference to FIG. 22 illustrating a block diagram and FIG. 23 illustrating a flowchart, a process for writing new video and audio data over the AV file (AVfile-d) will be described. Here, the size of the video and audio data to be newly written is larger than the size of the video and audio data already recorded in the AV file (AVfile-d).
(S1201) A system control section 201 follows a control program built therein as file structure reproduction means 110 so as to acquire positional information of an unallocated area corresponding to the size that the AV file (AVfile-d) is short of, and necessary for, writing the new video and audio data from the space bit map 1021.
(S1202) The system control section 201 follows a control program built therein as file recording means 213 so as to overwrite the data in the AV file (AVfile-d), and instructs an optical disc drive device 205 to record data in the unallocated area acquired in step (S1201). The optical disc drive device 205 records the video and audio data transferred from a data memory 221 and writes the relevant control data over the data in the control file (Datafile). When a defect area is detected during the file recording processing, the optical disc drive device 205 substitutively records the content of the AV file, which is to be recorded in a defect area 1053, in the spare area 1005, and registers, in the DMA 1004, a spare entry 1051 which is information corresponding to an address 1045 of the defect area 1053 and an address 1046 of the spare area 1005. The optical disc drive device 205 notifies the system control section 201 of the completion of the recording operation.
(S1203) The system control section 201 follows a control program built therein as file structure recording means 1101 so as to reflect the recording state of the unallocated area, used in step (S1202), in the space bit map 1021.
(S1204) The system control section 201 follows a control program built therein as the file structure recording means 1101 so as to instruct the optical disc drive device 205 to record in the file structure area 1001 the updated space bit map 1021, the file entry (Datafile) 1029 of the control file (Datafile) 1030, and the file entry (AVfile-d) 1028 of the recorded AV file. The optical disc drive device 205 writes such file structures transferred from a file structure memory 1103 over the data in the file structure area, and notifies the system control section 201 of the completion of the recording operation.
In the above example of substituting for a defect area, the AV file is overwritten. The substituting is similarly performed for recording a data file such as a control file, a volume structure or a file structure.
In a lead-in area of the DVD-RAM disc, four data structure area DMAs (Defect Management Areas) for defect management performed in a sector in the volume space are provided. All such DMAs are rewritten at the corresponding position each time a defect occurs.
For simplicity of explanation, the spare area is located in the lead-in area in the above example. In an actual DVD-RAM disc, however, a spare area is provided between the lead-in area and the volume space. In the case where there is a shortage of the spare area due to frequent occurrence of substitution, an additional spare area is provided in an area external to the volume space.
In the case of a rewritable disc in which data can be rewritten in the same sector 100,000 times, no problem occurs even if data is concentratedly rewritten in the same sector. In the case of a rewritable disc to which the number of times data can be rewritten is limited to about 100 to 1000 times, however, the following problems occur when the user newly creates, rewrites, or deletes a file: since data is frequently written in the same area, defects easily occur as a result of which important data, such as a file structure or a control file, is destroyed, or data cannot be recorded on the medium.
The present invention for solving the above-described problems has an objective of sequentially moving an AV file area and a basic file structure area from an inner portion to an outer portion of a disc to which the number of times of data rewrite is limited, so as to avoid concentration of data rewrite in the same area and thus prevent occurrence of a defect.